package net.telesing.tcmc;

import org.nutz.dao.Dao;
import org.nutz.ioc.Ioc;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.mvc.NutConfig;
import org.nutz.mvc.Setup;

public class MainSetup implements Setup
{
    @Inject
    public static Dao dao;

    /**
     * 当应用启动的时候
     */
    public void init(NutConfig config)
    {
        Ioc ioc = config.getIoc();
        dao = ioc.get(Dao.class, "dao");
}

    /**
     * 当应用关闭的时候
     *
     * @param config
     */
    public void destroy(NutConfig config) {}

}
